package org.feng.service.impl;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import org.feng.entity.pojo.User;
import org.feng.mapper.UserMapper;
import org.feng.service.UserService;
import org.feng.serive.impl.BaseServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author feng
 * @since 2021-08-27
 */
@Service
public class UserServiceImpl extends BaseServiceImpl<UserMapper, User> implements UserService {
    @Resource
    private UserMapper userMapper;

    @Override
    public User getUserByUsername(String username) {
        return userMapper.selectOne(Wrappers.<User>query().eq("username", username));
    }
}
